package com.bng8.superstar_cms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bng8.superstar_cms.domain.common.PageQuery;
import com.bng8.superstar_cms.domain.common.PageResult;
import com.bng8.superstar_cms.domain.dto.SupUserDTO;
import com.bng8.superstar_cms.domain.dto.SupUserQueryDTO;
import com.bng8.superstar_cms.domain.entity.SupUserDO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 20393
 * @description 针对表【sup_user(用户表)】的数据库操作Service
 * @createDate 2023-08-15 14:07:57
 */
public interface SupUserService extends IService<SupUserDO> {
    /**
     * 新增用户
     *
     * @param supUserDTO 前端传入数据
     * @return 有返回结果
     */
    int save(SupUserDTO supUserDTO, HttpServletRequest request) throws Exception;

    /**
     * 更新用户
     *
     * @param id
     * @param supUserDTO
     * @return
     */
    int update(Long id, SupUserDTO supUserDTO, HttpServletRequest request);

    /**
     * 分页多条件查询
     *
     * @param pageQuery
     * @return
     */
    PageResult<List<SupUserDTO>> query(PageQuery<SupUserQueryDTO> pageQuery);
}